﻿using Abp.AutoMapper;
using Akso.Enums;
using Akso.Warehouses.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Akso.Web.Areas.PSSModule.Models.Warehouses
{
    public class WarehousesViewModel
    {
        public string FilterText { get; set; }
    }
    /// <summary>
    /// 在弹出的新增、修改窗口里面，传递给页面的ViewModel对象。
    /// </summary>
    [AutoMapFrom(typeof(GetWarehouseForEditOutput))] //如果不加这个，弹出窗体会报错
    public class CreateOrEditWarehouseModalViewModel: GetWarehouseForEditOutput
    {
        public bool IsEditMode
        {
            get { return Warehouse.Id.HasValue; }
        }
        public CreateOrEditWarehouseModalViewModel(GetWarehouseForEditOutput output)
        {
            output.MapTo(this);
        }
    }
}